#import "sybase_sup.h"
#import "SUPAnnotations.h"

#import "SUPAbstractEntity.h"
#import "SUPObjectList.h"
#import "SUPLogRecord.h"
#import "SUPMobileBusinessObject.h"
#import "Notification_Task4_Notification_Task4DB.h"
#import "Notification_Task4_PersonalizationParameters.h"


@class SUPEntityMetaData;

// public interface declaration, can be used by application. 
/*!
 @class Notification_Task4_OperationReplay
 @abstract This class is part of package "Notification_Task4:1.0"
 @discussion Generated by Sybase Unwired Platform, compiler version 1.5.2.917
*/ 
@interface Notification_Task4_OperationReplay : SUPAbstractEntity<SUPMobileBusinessObject>
{
@private
    NSString* _remoteId;
    NSString* _component;
    NSString* _entityKey;
    NSString* _attributes;
    NSString* _operation;
    NSString* _parameters;
    NSString* _replayLog;
    NSString* _exception;
    BOOL _completed;
    int64_t _requestId;
}

@property(retain) NSString* remoteId;
@property(retain) NSString* component;
@property(retain) NSString* entityKey;
@property(retain) NSString* attributes;
@property(retain) NSString* operation;
@property(retain) NSString* parameters;
@property(retain) NSString* replayLog;
@property(retain) NSString* exception;
@property(assign) BOOL completed;
@property(assign) int64_t requestId;

- (void)dealloc;
/*!
  @method 
  @abstract Create this entity row in the database
  @discussion
  @throws SUPPersistenceException
 */
- (void)create;
/*!
  @method 
  @abstract Update this entity row in the database
  @discussion
  @throws SUPPersistenceException
 */
- (void)update;
/*!
  @method 
  @abstract Delete this entity row from the database
  @discussion
  @throws SUPPersistenceException
 */
- (void)delete;
/*!
  @method 
  @abstract Copy all attributes (except relationships) from 'other' to this entity
  @discussion
 */
- (void)copyAll:(Notification_Task4_OperationReplay*)other;
/*!
  @method 
  @abstract Returns the entity for the primary key value passed in, or null if the entity is not found.
  @discussion
  @throws SUPPersistenceException
 */
+ (Notification_Task4_OperationReplay*)find:(int64_t)id;
/*!
  @method 
  @abstract Same as the find method above, but takes a string representation of the primary key as its parameter.
  @discussion
  @throws SUPPersistenceException
 */
+ (Notification_Task4_OperationReplay*)find_by_id_string:(NSString*)id_string;
/*!
  @method 
  @abstract Returns the primary key for this entity.
  @discussion
 */
- (int64_t)_pk;
- (int64_t)id;
/*!
  @method 
  @abstract Returns the primary key for this entity as a string.
  @discussion
 */
- (NSString*)keyToString;
/*!
  @method 
  @abstract Returns the entity for the primary key value passed in; throws an exception if the entity is not found.
  @discussion
  @throws SUPPersistenceException
 */
+ (Notification_Task4_OperationReplay*)load:(int64_t)id;
+ (SUPEntityMetaData*)metaData;
/*!
  @method 
  @abstract Creates a new autoreleased instance of this class
  @discussion
 */
+ (Notification_Task4_OperationReplay*)getInstance;
/*!
  @method 
  @abstract Returns an SUPObjectList of log records for this entity.
  @discussion
  @throws SUPPersistenceException
 */
- (SUPObjectList*)getLogRecords;
/*!
  @method 
  @abstract Creates a new log record for this entity.
  @discussion
  @throws SUPPersistenceException
 */
- (id<SUPLogRecord>)createLogRecord:(int32_t)level withMessage:(NSString*)message;
/*!
  @method 
  @abstract Saves (creates or updates) this entity in the database.
  @discussion
  @throws SUPPersistenceException
 */
- (void)save;
/*!
  @method 
  @abstract Return a string description of this entity.
  @discussion
 */
- (NSString*)toString;
/*!
  @method 
  @abstract Return a string description of this entity.
  @discussion
 */
- (NSString*)description;
/*!
  @method 
  @abstract If this entity has pending changes, submits those changes to the server.
  @discussion
  @throws SUPPersistenceException
 */
- (void)submitPending;
/*!
  @method replay
  @abstract Generated class method 
  @throws SUPPersistenceException
 */
+ (void)replay;
/*!
  @method mbsReplay
  @abstract Generated instance method 
  @throws SUPPersistenceException
 */
- (void)mbsReplay;
/*!
  @method saveErrorInfo
  @abstract Generated instance method 
  @throws SUPPersistenceException
 */
- (void)saveErrorInfo;
/*!
  @method findReadyToReplay
  @abstract Generated named query
  @param remoteId
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)findReadyToReplay:(NSString*)remoteId;

/*!
  @method findReadyToReplay
  @abstract Generated named query
  @param remoteId
  @param skip
  @param take
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)findReadyToReplay:(NSString*)remoteId skip:(int32_t)skip take:(int32_t)take;
/*!
  @method findReadyToFinish
  @abstract Generated named query
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)findReadyToFinish;

/*!
  @method findReadyToFinish
  @abstract Generated named query
  @param skip
  @param take
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)findReadyToFinish:(int32_t)skip take:(int32_t)take;
/*!
  @method getPendingObjects
  @abstract Generated named query
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getPendingObjects;

/*!
  @method getPendingObjects
  @abstract Generated named query
  @param skip
  @param take
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getPendingObjects:(int32_t)skip take:(int32_t)take;
/*!
  @method getPendingObjects
  @abstract Generated named query
  @param pendingChange
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getPendingObjects:(unichar)pendingChange;

/*!
  @method getPendingObjects
  @abstract Generated named query
  @param pendingChange
  @param skip
  @param take
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getPendingObjects:(unichar)pendingChange skip:(int32_t)skip take:(int32_t)take;
/*!
  @method getReplayPendingObjects
  @abstract Generated named query
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getReplayPendingObjects;

/*!
  @method getReplayPendingObjects
  @abstract Generated named query
  @param skip
  @param take
  @throws SUPPersistenceException
 */

+ (SUPObjectList*)getReplayPendingObjects:(int32_t)skip take:(int32_t)take;


@end

typedef SUPObjectList Notification_Task4_OperationReplayList;

// internal methods declaration, only used by generated code.
@interface Notification_Task4_OperationReplay(internal)


- (id)initFromJson:(SUPJsonObject*)json:(int32_t)flags;
- (void)readJson:(SUPJsonObject*)json:(int32_t)flags;
- (SUPJsonObject*)json:(int32_t)flags;
+ (SUPObjectList*)fromJSONList:(SUPJsonArray*)jsonArray NS_RETURNS_RETAINED;
+ (SUPJsonArray*)toJSONList:(SUPObjectList*)instanceList;


- (Notification_Task4_Notification_Task4DB*)database;
@end